<div id="top-panel">
    <div id="panel">
        <ul>
            <li><a href="<?php echo site_url("ads"); ?>" class="report">Ads</a></li>           
			<li><a href="<?php echo site_url("ads/broadcast"); ?>" class="report_seo">Broadcast</a></li>
			<li><a href="<?php echo site_url("ads/broadcast_create"); ?>" class="report_seo">Create</a></li>
        </ul>
    </div>
</div>
<div id="wrapper">
	<div id="content">
		<div id="rightnow">
			<h3 class="reallynow">Broadcast list</h3>
			<?php if (count($broadcast)): ?>
			<table width="100%">
				<thead>
					<tr>
						<th>Ad Text</th>
						<th>Status</th>
						<th>Start date</th>
						<th>End date</th>
						<th colspan="2">Task</th>
					</tr>
				</thead>
				<tbody>
					<?php foreach($broadcast as $v): ?>
					<tr>
						<td><div align="center"><?php echo $v['ad_text']; ?></div></td>
						<td><div align="center">
							<?php if($v['status']==1): ?>Active<?php endif; ?>
							<?php if($v['status']==0): ?>UnActive<?php endif; ?>						
						</div></td>
						<td><div align="center"><?php echo $v['start_date']; ?></div></td>
						<td><div align="center"><?php echo $v['end_date']; ?></div></td>
						<td><div align="center"><a class="tool" href="<?php echo site_url("ads/broadcast_delete/".$v['id']); ?>">Delete</a></div></td>
						<td><div align="center"><a class="tool" href="<?php echo site_url("ads/broadcast_edit/".$v['id']); ?>">Edit</a></div></td>					
					</tr>
					<?php endforeach; ?>
				</tbody>
			</table>
			<?php else: ?>
				<p>No data to display</p>
			<?php endif; ?>
		</div>
	</div>
</div>